Programming with ornaments

نویسندگان

  • Hsiang-Shang Ko
  • Jeremy Gibbons
چکیده

Dependently typed programming advocates the use of various indexed versions of the same shape of data, but the formal relationship among these structurally similar datatypes usually needs to be established manually and tediously. Ornaments have been proposed as a formal mechanism to manage the relationships between such datatype variants. In this paper, we conduct a case study under an ornament framework; the case study concerns programming binomial heaps and their operations — including insertion and minimum extraction — by viewing them as lifted versions of binary numbers and numeric operations. We show how current dependently typed programming technology can lead to a clean treatment of the binomial heap constraints when implementing heap operations. We also identify some gaps between the current technology and an ideal dependently typed programming language that we would wish to have for our development.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Ornaments in practice, higher-order ornaments

6 Syntactic ornaments in the binary language 21 6.1 From ornaments to projection . . . . . . . . . . . . . . . . . . . . . . . . . . 24 6.2 Syntax of the binary language . . . . . . . . . . . . . . . . . . . . . . . . . . 25 6.3 Projection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 6.4 Datatype environment . . . . . . . . . . . . . . . . . . . . . . . . . . ....

متن کامل

The essence of ornaments

Functional programmers from all horizons strive to use, and sometimes abuse, their favorite type system in order to capture the invariants of their programs. A widely-used tool in that trade consists in defining finely-indexed datatypes. Operationally, these types classify the programmer’s data, following the ML tradition. Logically, these types enforce the program invariants in a novel manner....

متن کامل

A Comparative Study on the Symbolism in Turkmen and Baluch Ornaments in Iran

Despite the advent of mechanization in modern life, there are still men and women who create unique handicrafts that are the result of their taste and initiative. For a long time, jewelry has been of special importance among different ethnic groups in Iran, because such artifacts have come out of their creative and innovative minds and they reflect their culture, customs and traditions. Perhaps...

متن کامل

A Study of Geometric Ornaments of Plaster Mihrabs Made between 12th and the mid-14th Centuries in Iran

The geometric ornaments are considered as a kind of decorating that has been used mostly in the Islamic art, alone and sometimes in conjunction with other motifs or inscriptions. The plaster altars made between 12th and the mid-14th centuries towards the Seljuk and Ilkhanid dynasties, are also considered as the works that have been decorated using various plant decorations and inscriptions, as ...

متن کامل

The Comparative Study of Geometric Ornaments of Plaster Mihrabs Created during Seljuk Period versus the Ones Created during Ilkhanid Period in Iran

The geometric decorations are among the most widely used decorations in Islamic art, which have been used alone and sometimes in combination with other motifs or inscriptions. The plaster Mihrabs related to 6th to the mid-8th century AH, coincided with the Seljuk and IL-Khanid eras, are among the works that in addition to various plant decorations and inscriptions, are decorated with various ge...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:
  • J. Funct. Program.

دوره 27  شماره 

صفحات  -

تاریخ انتشار 2017